package vip.xiaonuo.vehicle.vehicleTraffic.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 板结果
 *
 * @author cad
 * @date 2023/03/27
 */
@NoArgsConstructor
@Data
public class PlateResult {



    private Long deviceId;

    private String deptCode;

    private String tenantCode;


    @JsonProperty("AlarmInfoPlate")
    private AlarmInfoPlateDTO alarmInfoPlate;

    @NoArgsConstructor
    @Data
    public static class AlarmInfoPlateDTO {
        @JsonProperty("channel")
        private Integer channel;
        @JsonProperty("deviceName")
        private String deviceName;
        @JsonProperty("ipaddr")
        private String ipaddr;
        @JsonProperty("result")
        private ResultDTO result;
        @JsonProperty("serialno")
        private String serialno;
        @JsonProperty("user_data")
        private String userData;

        @NoArgsConstructor
        @Data
        public static class ResultDTO {
            @JsonProperty("PlateResult")
            private PlateResultDTO plateResult;

            @NoArgsConstructor
            @Data
            public static class PlateResultDTO {
                @JsonProperty("bright")
                private Integer bright;
                @JsonProperty("carBright")
                private Integer carBright;
                @JsonProperty("carColor")
                private Integer carColor;
                @JsonProperty("colorType")
                private Integer colorType;
                @JsonProperty("colorValue")
                private Integer colorValue;
                @JsonProperty("confidence")
                private Integer confidence;
                @JsonProperty("direction")
                private Integer direction;
                @JsonProperty("gioouts")
                private List<?> gioouts;
                @JsonProperty("isoffline")
                private Integer isoffline;
                @JsonProperty("license")
                private String license;
                @JsonProperty("license_ext_type")
                private Integer licenseExtType;
                @JsonProperty("location")
                private LocationDTO location;
                @JsonProperty("plateid")
                private Integer plateid;
                @JsonProperty("timeStamp")
                private TimeStampDTO timeStamp;
                private String imageFragmentFile;
                @JsonProperty("timeUsed")
                private Integer timeUsed;
                @JsonProperty("triggerType")
                private Integer triggerType;
                @JsonProperty("type")
                private Integer type;

                @NoArgsConstructor
                @Data
                public static class LocationDTO {
                    @JsonProperty("RECT")
                    private RECTDTO rect;

                    @NoArgsConstructor
                    @Data
                    public static class RECTDTO {
                        @JsonProperty("bottom")
                        private Integer bottom;
                        @JsonProperty("left")
                        private Integer left;
                        @JsonProperty("right")
                        private Integer right;
                        @JsonProperty("top")
                        private Integer top;
                    }
                }

                @NoArgsConstructor
                @Data
                public static class TimeStampDTO {
                    @JsonProperty("Timeval")
                    private TimevalDTO timeval;

                    @NoArgsConstructor
                    @Data
                    public static class TimevalDTO {
                        @JsonProperty("decday")
                        private Integer decday;
                        @JsonProperty("dechour")
                        private Integer dechour;
                        @JsonProperty("decmin")
                        private Integer decmin;
                        @JsonProperty("decmon")
                        private Integer decmon;
                        @JsonProperty("decsec")
                        private Integer decsec;
                        @JsonProperty("decyear")
                        private Integer decyear;
                        @JsonProperty("sec")
                        private Integer sec;
                        @JsonProperty("usec")
                        private Integer usec;
                    }
                }
            }
        }
    }
}
